this._lightbox.show();
this._group.opacity = 0;
this._group.show();
+ this._initialKeyFocus.grab_key_focus();
Tweener.addTween(this._group,
{ opacity: 255,
time: OPEN_AND_CLOSE_TIME,
transition: 'easeOutQuad',
onComplete: Lang.bind(this,
function() {
- this._initialKeyFocus.grab_key_focus();
this.state = State.OPENED;
this.emit('opened');
- }),
+ })
});
},
+ setInitialKeyFocus: function(actor) {
+ this._initialKeyFocus = actor;
+ },
+
open: function(timestamp) {
if (this.state == State.OPENED || this.state == State.OPENING)
return true;
if (!Main.pushModal(this._group, timestamp))
return false;
- global.stage.set_key_focus(this._group);
-
this._fadeOpen();
return true;
},
this._entryText = entry.clutter_text;
this.contentLayout.add(entry, { y_align: St.Align.START });
- this.connect('opened',
- Lang.bind(this, function() {
- this._entryText.grab_key_focus();
- }));
+ this.setInitialKeyFocus(this._entryText);
this._errorBox = new St.BoxLayout({ style_class: 'run-dialog-error-box' });